<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="renderer" content="webkit|ie-comp|ie-stand">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <title>员工档案</title>
  <script src="../../../static/kaige/js/szload.js"></script>
  <style>
    .layui-tab .layui-form-item .layui-form-label {
      width: 120px;
    }

    .layui-tab .layui-form-item .layui-input-inline {
      width: 220px;
    }
  </style>
</head>

<body>
  <div class="kaige-body kaige-table pagelist">
    <table class="layui-hide" id="kaigeTable" lay-filter="kaigeTable"></table>
    <input type="hidden" name="keywordsCache" value="{}" />
  </div>
  <script>
    load_init_js(function () {
      layui.config({
        base: szoapcpath + '/static/kaige/layuiextend/'
      }).use(['kaige','pingyin'], function () {
        var form = layui.form, table = layui.table, laydate = layui.laydate, kaige = layui.kaige, element = layui.element,pingyin = layui.pingyin;
        //系统默认图片
        window.default_image = szoapcpath + "/static/img/default.png";
        //查看图片
        window.viewImage = function (imgUrl) { kaige.viewimage({ maxwidth: 600, maxheight: 600, url: imgUrl }); }

        //上传文件
        function upfile_load_click() {
          //头像上传
          kaige.upload_multi_files({
            input_id: '#i_avatar',
            img_id: '#src_avatar',
            btn: '#u_avatar',
            url: szoa.client.path + '/pages/files/upfiles.html?id=7'
          });
          //合同文件上传
          kaige.upload_multi_files({
            input_id: '#i_contract',
            img_id: '#src_contract',
            btn: '#u_contract',
            url: szoa.client.path + '/pages/files/upfiles.html?id=7'
          });
          //合同文件上传
          kaige.upload_multi_files({
            input_id: '#i_quit',
            img_id: '#src_quit',
            btn: '#u_quit',
            url: szoa.client.path + '/pages/files/upfiles.html?id=7'
          });
          //身份证正面上传
          kaige.upload_multi_files({
            input_id: '#i_card_front',
            img_id: '#src_card_front',
            btn: '#u_card_front',
            url: szoa.client.path + '/pages/files/upfiles.html?id=7'
          });
          //身份证反面上传
          kaige.upload_multi_files({
            input_id: '#i_card_verso',
            img_id: '#src_card_verso',
            btn: '#u_card_verso',
            url: szoa.client.path + '/pages/files/upfiles.html?id=7'
          });

          //学历证书上传
          kaige.upload_multi_files({
            input_id: '#i_educ_img',
            img_id: '#src_educ_img',
            btn: '#b_educ_img',
            url: szoa.client.path + '/pages/files/upfiles.html?id=7'
          });

        }

        //添加与编辑时加载
        function addedit_load() {
          laydate.render({ elem: '#entry_time' });
          laydate.render({ elem: '#dimission_time' });
          element.render('tab');
          $('input[name=pingyin_name]').on('click', function (e) {
            pinyinauto();
          });
          upfile_load_click();

          //上级主管
          kaige.tableSelect({
            id: 'super_id',
            url: '/select/employee',
            where: { automatch: 1 },
            cols: [[
              { type: 'radio' },
              { field: 'id', title: 'ID', hide: true },
              { field: 'real_name', title: '名称' },
              { field: 'dept_id_name', title: '部门' },
              { field: 'ranking_id_name', title: '岗位' }
            ]]
          });

          //主职位
          kaige.tableSelect({
            id: 'ranking_id',
            url: '/select/ranking',
            where: { automatch: 1 },
            cols: [[
              { type: 'radio' },
              { field: 'id', title: 'ID', hide: true },
              { field: 'name', title: '名称' }
            ]]
          });

          //主部门
          kaige.xmSelectTree({
            id: 'dept_id',
            url: '/select/depttree',
            udata: { automatch: 1 },
            radio: true,
            clickClose: true
          });

          //多部门
          kaige.xmSelectTree({
            id: 'dept_other',
            url: '/select/depttree',
            udata: { automatch: 1 },
          });
        
          //多职位
          kaige.xmSelectTree({
            id: 'ranking_other',
            url: '/select/rankingtree',
            udata: { automatch: 1 },
          });
        }

        function pinyinauto() {
          var chinaName = $('input[name=real_name]').val();
          var fullName = pingyin.render(chinaName,1);
          $('input[name=pingyin_name]').val(fullName);
        }
        //加载列表
        kaige.table({
          elem: '#kaigeTable',
          title: '员工列表',
          url: "/hrm.employee/index",
          id: 'kaigeTable',
          toolbar: '#dtoolbar',
          cols: [[
            { type: 'checkbox', fixed: 'left' },
            { type: 'numbers', title: '序号', fixed: 'left', hide: true },
            { field: 'phone', title: '员工', templet: '#employeeinfoTpl', sort: true, width: 180, fixed: 'left' },
            { field: 'bn', title: '编号', width: 130, hide: true },
            { field: 'pingyin_name', title: '名字拼音', width: 130, sort: true, hide: true },
            {
              field: 'sex', title: '性别', width: 80, sort: true, align: 'center', templet: function (d) {
                return sex2icon(d.sex);
              }
            },
            { field: 'dept_id_name', title: '主部门', width: 140 },
            { field: 'ranking_id_name', title: '岗位', width: 140 },
            { field: 'super_name', title: '上级主管', width: 140 },
            { field: 'company_name', title: '单位', width: 140 },
            { field: 'email', title: '邮箱', width: 140 },
            { field: 'tel', title: '办公电话', width: 140, hide: true },
            { field: 'entry_time', title: '入职时间', width: 130 },
            { field: 'id_card', title: '身份证', width: 200 },
            { field: 'bankcard', title: '银行卡', width: 240 },
            { field: 'kaihuhang', title: '开户行', width: 200 },
            { field: 'educational', title: '学历', width: 100, hide: true },
            { field: 'email', title: '邮箱', width: 160, hide: true },
            { field: 'dimission_time', title: '离职日期', width: 130, hide: true },
            { field: 'sort', title: '排序', width: 90, sort: true },
            {
              field: 'on_duty', title: '在岗', width: 90, sort: true, templet: function (d) {
                return yesno2tag(d.on_duty);
              }
            },
            {
              field: 'status', title: '状态', width: 90, sort: true, templet: function (d) {
                return yesno2icon(d.status);
              }
            },
            { field: 'create_time', title: '创建时间', width: 160, hide: true },
            { field: 'update_time', title: '更新时间', width: 160, hide: true },
            { field: 'id', title: '操作', toolbar: '#dtrbar', align: 'center', width: 80, fixed: 'right' }
          ]],
          done: function (res, curr, count) {

          }
        });

        //列表-监听表头工具栏事件dtoolbar
        table.on('toolbar(kaigeTable)', function (obj) {
          var checkStatus = table.checkStatus(obj.config.id);
          switch (obj.event) {
            case 'btn-add':
              /*添加*/
              btn_add();
              break;
            case 'btn-del':
              /*删除*/
              btn_del(checkStatus);
              break;
            case 'btn-search':
              /*搜索*/
              btn_search();
              break;
            case 'btn-refresh':
              location.reload();
              break;
            case 'btn-all':
              btn_all();
              break;
          }
        });

        //列表-监听单元格行工具事件dtrbar
        table.on('tool(kaigeTable)', function (obj) {
          var data = obj.data;
          switch (obj.event) {
            case 'edit':
              /*修改*/
              bar_edit(data);
              break;
          }
        });

        /**向服务端发送请求排序*/
        table.on('sort(kaigeTable)', function (obj) {
          /*
          obj:{field:当前排序的字段名,type:当前排序类型：desc（降序）、asc（升序）、null（空对象，默认排序）}
          this:当前排序的 th 对象
          */
          table.reload('kaigeTable', {
            initSort: obj
            , where: {
              sortfield: obj.field
              , sortord: obj.type
            }
            , page: {
              curr: 1
            }
          });
        });

        //全显
        function btn_all() {
          $('input[name=keywordsCache]').val('');
          reload_sxtable({ type: 2 });
        }

        //添加
        function btn_add() {
          kaige.form({
            url: "/hrm.employee/add",
            data: {},
            id: 'kaige',
            area: ['800px', '600px'],
            title: '<i class="layui-icon layui-icon-add-circle"></i> 员工添加',
            tablelayid: 'kaigeTable',
            encode: 1,
            overflow: true,
            callbefore: function () {
              addedit_load();
            }
          });
        }

        //员工修改
        function bar_edit(d) {
          kaige.form({
            url: "/hrm.employee/edit",
            data: { id: d.id },
            id: 'kaige',
            area: ['800px', '600px'],
            title: '<i class="layui-icon layui-icon-edit"></i> 员工编辑',
            tablelayid: 'kaigeTable',
            encode: 1,
            overflow: true,
            callbefore: function () {
              addedit_load();
            }
          });
        }

        //表单id转name赋值
        function idtoname(a) {
          var c = $(a.id).val();
          if (-1 < c.indexOf(",")) for (ids = c.split(","), j = 0; j < ids.length; j++) {
            var d = $(a.name).val();
            $.each(a.data, function (c, b) {
              b.id == ids[j] && (d ? $(a.name).val(d + "," + b.name) : $(a.name).val(b.name))
            })
          } else $.each(a.data, function (d, b) {
            b.id == c && $(a.name).val(b.name)
          })
        };

        //表格id转name取值
        function idgetname(a) {
          var res = '';
          $.each(a.data, function (d, b) {
            if (b.id == a.id) res = b.name;
          })
          return res;
        };

        //删除
        function btn_del(d) {
          kaige.del({
            url: "/hrm.employee/del",
            data: d.data,
            tablelayid: 'kaigeTable',
          });
        }

        /*高级筛选*/
        function btn_search() {
          layer.open({
            type: 1,
            id: 'moresearch',
            area: ['360px', '410px'],
            fixed: false,
            title: '<i class="layui-icon layui-icon-search"></i> 高级筛选',
            maxmin: false,
            shade: 0, anim: 4,
            resize: false,
            offset: ['50px', '70px'],
            content: '<form class="kaige-body layui-form layui-form-pane moresearchform" lay-filter="moresearchform">\
                            <div class="layui-form-item">\
                                <label class="layui-form-label">姓名</label></label></label>\
                                <div class="layui-input-inline">\
                                    <input type="text" name="search_real_name" placeholder="姓名" autocomplete="off" class="layui-input">\
                                </div>\
                            </div>\
                            <div class="layui-form-item">\
                                <label class="layui-form-label">手机号</label>\
                                <div class="layui-input-inline">\
                                    <input type="text" name="search_phone" placeholder="手机号" autocomplete="off" class="layui-input">\
                                </div>\
                            </div>\
                            <div class="layui-form-item">\
                                <label class="layui-form-label">编号</label>\
                                <div class="layui-input-inline">\
                                    <input type="text" name="search_code" placeholder="编号" autocomplete="off" class="layui-input">\
                                </div>\
                            </div>\
                            <div class="layui-form-item">\
                                <label class="layui-form-label">入职时间</label>\
                                <div class="layui-input-inline">\
                                    <input type="text" name="search_date" id="search_date" placeholder="入职时间" autocomplete="off" class="layui-input">\
                                </div>\
                            </div>\
                            <div class="layui-form-item">\
                                <label class="layui-form-label">性别</label>\
                                <div class="layui-input-inline">\
                                    <select name="search_sex">\
                                        <option value=""></option>\
                                        <option value="1">男</option>\
                                        <option value="2">女</option>\
                                        <option value="3">待定</option>\
                                    </select>\
                                </div>\
                            </div>\
                            <div class="layui-form-item">\
                                <label class="layui-form-label">在岗</label>\
                                <div class="layui-input-inline">\
                                    <select name="search_on_duty">\
                                        <option value=""></option>\
                                        <option value="1">在岗人员</option>\
                                        <option value="2">不在岗人员</option>\
                                    </select>\
                                </div>\
                            </div>\
                            <div class="layui-form-item">\
                                <label class="layui-form-label">状态</label></label>\
                                <div class="layui-input-inline">\
                                    <select name="search_status">\
                                        <option value="">状态</option>\
                                        <option value="1">正常</option>\
                                        <option value="2">禁用</option>\
                                    </select>\
                                </div>\
                            </div>\
                        </form>',
            btn: ['确定', '取消'],
            yes: function (index, layero) {
              var advance = $(".moresearchform").serializeArray();
              $.each(advance, function (i, obj) {
                savekeywords(obj.name, obj.value);
              });
              reload_sxtable({ type: 2 });
              layer.close(index);
            },
            success: function () {
              $("#moresearch").css('overflow', 'visible');
              //从筛选缓存中取出值，给表单赋值
              form.val("moresearchform", {
                "search_real_name": getkeywords('search_real_name'),
                "search_code": getkeywords('search_code'),
                "search_date": getkeywords('search_date'),
                "search_sex": getkeywords('search_sex'),
                "search_on_duty": getkeywords('search_on_duty'),
                "search_status": getkeywords('search_status'),
                "search_phone": getkeywords('search_phone'),
              });
              form.render(null, 'moresearchform');
              laydate.render({
                elem: '#search_date',
                range: '～',
                format: 'yyyy-MM-dd',
                trigger: 'click'
              });
            }
          });
        }

        function btn_all() {
          savekeywords('search_real_name', '');
          savekeywords('search_code', '');
          savekeywords('search_sex', '');
          savekeywords('search_date', '');
          savekeywords('search_status', '');
          savekeywords('search_on_duty', '');
          savekeywords('search_phone', '');
          reload_sxtable({ type: 2 });
        }
        //获取筛选表单
        function getsearchform() {
          var gfv = {
            "search_real_name": getkeywords('search_real_name'),
            "search_code": getkeywords('search_code'),
            "search_date": getkeywords('search_date'),
            "search_sex": getkeywords('search_sex'),
            "search_on_duty": getkeywords('search_on_duty'),
            "search_status": getkeywords('search_status'),
            "search_phone": getkeywords('search_phone'),
          }
          gfv.rnd = Math.random();
          return gfv;
        }

        //执行筛选,重载表格
        function reload_sxtable(opt) {
          if (opt && JSON.stringify(opt.where) == "{}" && opt.type === 1) {
            layer.msg('当前没有筛选条件！'); return;
          }
          if (opt.type === 2) {
            opt.where = {};
            opt.where = getsearchform();
          }
          setTimeout(function () {
            table.reload('kaigeTable', {
              height: 'full-30',
              page: { curr: 1 },
              where: opt.where
            });
          }, 300);
        }


      });
    });
  </script>

  <script type="text/html" id="dtoolbar">
  <div class="layui-btn-container layui-form filter-form" lay-filter="searchform">
      <div class="layui-btn-group">
          <button class="layui-btn layui-btn-sm layui-bg-blue" lay-event="btn-add"><i class="layui-icon layui-icon-add-circle"></i> 添加</button>
          <button class="layui-btn layui-btn-sm layui-bg-blue" lay-event="btn-search"><i class="layui-icon layui-icon-search"></i> 搜索</button>
          <button class="layui-btn layui-btn-sm layui-bg-blue" lay-event="btn-all"><i class="fa fa-list-ul"></i> 全显</button>
          <button class="layui-btn layui-btn-sm layui-bg-blue" lay-event="btn-refresh"><i class="fa fa-refresh"></i> 刷新</button>
          <button class="layui-btn layui-btn-sm layui-bg-red" lay-event="btn-del"><i class="layui-icon layui-icon-delete"></i> 删除</button>
      </div>
  </div>
</script>
  <script type="text/html" id="dtrbar">
  <div class="layui-btn-group">
      <button class="layui-btn layui-btn-xs layui-bg-blue" lay-event="edit" title="编辑"><i class="layui-icon layui-icon-edit"></i></button>
  </div>
</script>
  <script type="text/html" id="employeeinfoTpl">
<div class="pageinfotitle">
    <div class="uif-avatar">
        {{# if( d.avatar != undefined || d.avatar != null ) { }}
          <a href="javascript:void(0);" onclick="viewImage('{{ d.avatar }}')">
            <img src="{{ d.avatar }}" class="list_avatar" alt=""/>
          </a>
        {{#  } else { }}
        <a href="javascript:void(0);" onclick="viewImage('{{ window.default_image }}')">
          <img src="{{ window.default_image }}" class="list_avatar" alt=""/>
        </a>
        {{#  } }}
    </div>
    <div class="uif-info">
        {{# if(d.phone=='' || d.phone==null || d.phone=='null') { }}
            <p>{{d.real_name}}</p>
        {{#  } else { }}
            <p>{{d.real_name}}</p>
            <p>{{d.phone}}</p>
        {{#  } }}
    </div>
</div>
</script>
  <script type="text/html" id="kaige_form_html">
  <form class="layui-form layui-form-pane kaige-body-form" style="padding: 5px;" lay-filter="kaige_form_lay_filter">
    {{# if(d.id){ }}
    <input type="hidden" name="id" value="{{ d.id }}" />
    {{# } }}
    <div class="layui-tab kaige-table" lay-filter="employee-tab">
      <ul class="layui-tab-title">
        <li class="layui-this"><span class="layui-badge layui-bg-green">1</span>&nbsp;&nbsp;&nbsp;&nbsp;基本信息</li>
        <li><span class="layui-badge layui-bg-blue">2</span>&nbsp;&nbsp;&nbsp;&nbsp;内联信息</li>
        <li><span class="layui-badge layui-bg-orange">3</span>&nbsp;&nbsp;&nbsp;&nbsp;档案信息</li>
        <li><span class="layui-badge layui-bg-black">4</span>&nbsp;&nbsp;&nbsp;&nbsp;其它信息</li>
      </ul>
      <div class="layui-tab-content">
        <div class="layui-tab-item layui-show">
          <div class="layui-form-item">
            <label class="layui-form-label">姓名</label>
            <div class="layui-input-inline">
              <input name="real_name" value="{{ d.real_name || '' }}" required lay-verify="required" title="请输入姓名" placeholder="请输入姓名" class="layui-input">
            </div>
            <label class="layui-form-label">编号</label>
            <div class="layui-input-inline">
              <input name="bn" value="{{ d.bn || '' }}" required lay-verify="required" title="请输入编号" placeholder="请输入编号" class="layui-input">
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">拼音</label>
            <div class="layui-input-inline">
              <input type="text" name="pingyin_name" value="{{ d.pingyin_name || '' }}" title="请输入姓名拼音" placeholder="请输入姓名拼音" class="layui-input">
            </div>
            <label class="layui-form-label">性别</label>
            <div class="layui-input-inline">
              <select name="sex">
                <option value=""></option>
                <option value="1" {{ d.sex == 1 ? 'selected':'' }} >男</option>
                <option value="2" {{ d.sex == 2 ? 'selected':'' }} >女</option>
                <option value="3" {{ d.sex != 1 && d.sex != 2 ? 'selected':'' }} >待定</option>
              </select>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">手机号</label>
            <div class="layui-input-inline">
              <input type="tel" name="phone" required lay-verify="required|phone|number" value="{{ d.phone || '' }}"  title="请输入手机号" placeholder="请输入手机号" class="layui-input">
            </div>
            <label class="layui-form-label">电话</label>
            <div class="layui-input-inline">
              <input type="tel" name="tel" value="{{ d.tel || '' }}" placeholder="请输入办公电话" class="layui-input">
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">邮箱</label>
            <div class="layui-input-inline">
              <input type="text" name="email" value="{{ d.email || '' }}" class="layui-input">
            </div>
            <label class="layui-form-label">微信号</label>
            <div class="layui-input-inline">
              <input type="text" name="weixinid" value="{{ d.weixinid || '' }}" class="layui-input">
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">入职日期</label>
            <div class="layui-input-inline">
              <input type="text" name="entry_time" id="entry_time" required lay-verify="required" value="{{ d.entry_time || '' }}" class="layui-input">
            </div>
            <label class="layui-form-label">头像</label>
            <div class='layui-input-inline' style="width: 80px;">
              <img id="src_avatar" style="height:auto;max-height:32px;min-width:32px" src="{{ d.avatar_url || '' }}" onclick="viewImage(this.src)" />
              <input type="hidden" name="avatar" id="i_avatar" value="{{ d.avatar || '' }}" >
            </div>
            <div class='layui-input-inline' style="width: 90px;">
              <a class="layui-btn layui-btn-sm layui-btn-selfc" id="u_avatar">上传头像</a>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-inline">
              <input type="text" name="sort" value="{{ d.sort || ''}}" placeholder="从小到大" class="layui-input">
            </div>
            <label class="layui-form-label">状态</label>
            <div class="layui-input-inline">
              <input type="checkbox" name="status" lay-skin="switch" lay-text="正常|禁用" {{ d.status == 1 ? 'checked':'' }} />
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">在岗</label>
            <div class="layui-input-inline">
              <select name="on_duty">
                <option value=""></option>
                <option value="1" {{ d.on_duty == 1 ? 'selected':'' }} >在职在岗</option>
                <option value="2" {{ d.on_duty == 2 ? 'selected':'' }} >在职不在岗</option>
              </select>
            </div>
          </div>
        </div>
        <div class="layui-tab-item neilianform">
          <div class="layui-form-item">
            <label class="layui-form-label">所属单位</label>
            <div class="layui-input-inline">
              <select name="company_id" lay-filter="company_id" id="company_id">
                <option value="">选择单位</option>
                {{#  layui.each(d.companyList, function(index, item){ }}
                <option value="{{ item.id }}"  {{#  if(item.id == d.company_id ){ }} selected {{#  } }} >{{ item.name }}</option>
                {{#  }) }}
              </select>
            </div>
            <label class="layui-form-label">参与结算薪资</label>
            <div class="layui-input-inline">
              <input type="checkbox" name="is_balance" lay-skin="switch" lay-text="是|否" {{ d.is_balance == 1 ? 'checked':'' }} />
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">上级主管</label>
            <div class="layui-input-inline">
              <input type="text" id="super_id_name" value="{{ d.super_name || '' }}" name="super_name" class="layui-input" />
              <input type="hidden" id="super_id" value="{{ d.super_id || '' }}" name="super_id" />
            </div>
  
            <label class="layui-form-label">参与考勤</label>
            <div class="layui-input-inline">
              <input type="checkbox" name="is_kq" lay-skin="switch" lay-text="是|否"  {{ d.is_kq == 1 ? 'checked':'' }}/>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">职位</label>
            <div class="layui-input-inline">
              <input type="text" id="ranking_id_name" value="{{ d.ranking_id_name || '' }}" name="ranking_id_name" class="layui-input" />
              <input type="hidden" id="ranking_id" name="ranking_id" value="{{ d.ranking_id || '' }}" />
            </div>
            <label class="layui-form-label">主部门</label>
            <div class="layui-input-inline">
              <div id="dept_id_select_box"></div>
              <input type="hidden" id="dept_id_name" value="{{ d.dept_id_name || '' }}" name="dept_id_name" />
              <input type="hidden" id="dept_id" value="{{ d.dept_id || '' }}" name="dept_id" />
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">多部门</label>
            <div class="layui-input-inline" style="width: 580px;">
              <div id="dept_other_select_box"></div>
              <input type="hidden" id="dept_other_name" value="{{ d.dept_other_name || '' }}" name="dept_other_name" />
              <input type="hidden" id="dept_other" value="{{ d.dept_other || '' }}" name="dept_other" />
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">多职位</label>
            <div class="layui-input-inline" style="width: 580px;">
              <div id="ranking_other_select_box"></div>
              <input type="hidden" id="ranking_other_name" name="ranking_other_name" value="{{ d.ranking_other_name || '' }}" />
              <input type="hidden" id="ranking_other" name="ranking_other" value="{{ d.ranking_other || '' }}" />
            </div>
          </div>
        </div>
        <div class="layui-tab-item">
          <div class="layui-form-item">
            <label class="layui-form-label">合同编号</label>
            <div class="layui-input-inline">
              <input type="text" name="contract_code" value="{{ d.contract_code || '' }}"  placeholder="请输入合同编号" class="layui-input">
            </div>
            <label class="layui-form-label">合同文件</label>
            <div class='layui-input-inline' style="width: 80px;">
              <img id="src_contract" style="height:auto;max-height:32px;min-width:32px"  src="{{ d.contract_file_url || '' }}" onclick="viewImage(this.src)" />
              <input type="hidden" name="contract_file" id="i_contract" value="{{ d.contract_file || '' }}" >
            </div>
            <div class='layui-input-inline' style="width: 90px;">
              <a class="layui-btn layui-btn-sm layui-btn-selfc" id="u_contract">上传文件</a>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">离职时间</label>
            <div class="layui-input-inline">
              <input type="text" name="dimission_time" id="dimission_time" value="{{ d.dimission_time || '' }}" placeholder="离职时间" class="layui-input">
            </div>
            <label class="layui-form-label">离职文件</label>
            <div class='layui-input-inline' style="width: 80px;">
              <img id="src_quit" style="height:auto;max-height:32px;min-width:32px"  src="{{ d.quit_file_url || '' }}" onclick="viewImage(this.src)" />
              <input type="hidden" name="quit_file" id="i_quit" value="{{ d.quit_file || '' }}">
            </div>
            <div class='layui-input-inline' style="width: 90px;">
              <a class="layui-btn layui-btn-sm layui-btn-selfc" id="u_quit">上传文件</a>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">银行卡号</label>
            <div class="layui-input-inline">
              <input type="text" name="bankcard" id="bankcard" value="{{ d.bankcard || '' }}" placeholder="银行卡号" class="layui-input">
            </div>
            <label class="layui-form-label">开户行</label>
            <div class="layui-input-inline">
              <input type="text" name="kaihuhang" value="{{ d.kaihuhang || '' }}" placeholder="开户行" class="layui-input">
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">紧急联系人</label>
            <div class="layui-input-inline">
              <input type="text" name="emergency_contact" value="{{ d.emergency_contact || '' }}" placeholder="紧急联系人" class="layui-input">
            </div>
            <label class="layui-form-label">紧急电话</label>
            <div class="layui-input-inline">
              <input type="text" name="emergency_phone" value="{{ d.emergency_phone || '' }}"  placeholder="紧急电话" class="layui-input">
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">婚否</label>
            <div class="layui-input-inline">
              <select name="is_marry">
                <option value=""></option>
                <option value="1" {{ d.is_marry==1 ? 'selected':'' }} >已婚</option>
                <option value="2" {{ d.is_marry==2 ? 'selected':'' }} >未婚</option>
                <option value="3" {{ d.is_marry==3 ? 'selected':'' }} >离异</option>
                <option value="4" {{ d.is_marry==4 ? 'selected':'' }} >丧偶</option>
              </select>
            </div>
            <label class="layui-form-label">学历</label>
            <div class="layui-input-inline">
              <select name="educational">
                <option value=""></option>
                <option value="小学" {{ d.educational=='小学' ? 'selected':'' }}>小学</option>
                <option value="初中" {{ d.educational=='初中' ? 'selected':'' }}>初中</option>
                <option value="高中/中专" {{ d.educational=='高中/中专' ? 'selected':'' }}>高中/中专</option>
                <option value="大专" {{ d.educational=='大专' ? 'selected':'' }}>大专</option>
                <option value="本科" {{ d.educational=='本科' ? 'selected':'' }}>本科</option>
                <option value="研究生" {{ d.educational=='研究生' ? 'selected':'' }}>研究生</option>
              </select>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">身份证号码</label>
            <div class="layui-input-inline">
              <input type="text" name="id_card" value="{{ d.id_card || '' }}" placeholder="身份证号码" class="layui-input">
            </div>
            <label class="layui-form-label">身份证正面</label>
            <div class='layui-input-inline' style="width: 80px;">
              <img id="src_card_front" style="height:auto;max-height:32px;min-width:32px" src="{{ d.id_card_front_url || '' }}" onclick="viewImage(this.src)" />
              <input type="hidden" name="id_card_front" id="i_card_front" value="{{ d.id_card_front || '' }}">
            </div>
            <div class='layui-input-inline' style="width: 90px;">
              <a class="layui-btn layui-btn-sm layui-btn-selfc" id="u_card_front">上传正面</a>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">民族</label>
            <div class="layui-input-inline">
              <input type="text" name="nation" value="{{ d.nation || '' }}" placeholder="民族" class="layui-input">
            </div>
            <label class="layui-form-label">身份证反面</label>
            <div class='layui-input-inline' style="width: 80px;">
              <img id="src_card_verso" style="height:auto;max-height:32px;min-width:32px" src="{{ d.id_card_verso_url || '' }}" onclick="viewImage(this.src)" />
              <input type="hidden" name="id_card_verso" id="i_card_verso" value="{{ d.id_card_verso || '' }}">
            </div>
            <div class='layui-input-inline' style="width: 90px;">
              <a class="layui-btn layui-btn-sm layui-btn-selfc" id="u_card_verso">上传反面</a>
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">现居地址</label>
            <div class="layui-input-inline">
              <input type="text" name="address" value="{{ d.address || '' }}" placeholder="现居地址" class="layui-input">
            </div>
            <label class="layui-form-label">身份证地址</label>
            <div class="layui-input-inline">
              <input type="text" name="card_address"  value="{{ d.card_address || '' }}" placeholder="身份证地址" class="layui-input">
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">毕业院校</label>
            <div class="layui-input-inline">
              <input type="text" name="graduate_institutions" value="{{ d.graduate_institutions || '' }}" placeholder="毕业院校" class="layui-input">
            </div>
            <label class="layui-form-label">政治面貌</label>
            <div class="layui-input-inline">
              <input type="text" name="politics" value="{{ d.politics || '' }}" placeholder="政治面貌" class="layui-input">
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">学历证书</label>
            <div class='layui-input-inline' style="width: 80px;">
              <img id="src_educ_img" style="height:auto;max-height:32px;min-width:32px" src="{{ d.educ_img_url || '' }}" onclick="viewImage(this.src)" />
              <input type="hidden" name="educ_img" id="i_educ_img" value="{{ d.educ_img || '' }}">
            </div>
            <div class='layui-input-inline' style="width: 90px;">
              <a class="layui-btn layui-btn-sm layui-btn-selfc" id="b_educ_img">上传</a>
            </div>
          </div>
        </div>
        <div class="layui-tab-item">
          <div class="layui-form-item">
            <label class="layui-form-label">APP推送</label>
            <div class="layui-input-inline">
              <input type="checkbox" name="is_app_push" lay-skin="switch" lay-text="是|否" {{ d.is_app_push==1 ? 'checked':'' }} />
            </div>
            <label class="layui-form-label">通讯录显示</label>
            <div class="layui-input-inline">
              <input type="checkbox" name="is_card" lay-skin="switch" lay-text="是|否" {{ d.is_card==1 ? 'checked':'' }} />
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">最后推送时间</label>
            <div class="layui-input-inline">
              <input type="text" disabled name="last_push_time" value="{{ d.last_push_time || '' }}" class="layui-input" />
            </div>
            <label class="layui-form-label">主题</label>
            <div class="layui-input-inline">
              <select name="theme">
                <option value=""></option>
                <option value="1" selected>默认主题</option>
              </select>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="layui-form-item layui-hide">
      <button class="layui-hide" lay-submit="" id="kaige_form_btn_save" lay-filter="kaige_form_btn_save">保存数据</button>
    </div>
  </form>
</script>
</body>

</html>